package de.ur.iw.wiki;

import java.util.HashMap;

public class LinkInfo {
	
	/**
	 * procentual position of the link in its paragraph
	 */
	public static final String KEY_POSITION_IN_PARAGRAPH = "positionInParagraph";
	/**
	 * procentual position of the paragraph this link is in in the page
	 */
	public static final String KEY_POSITION_OF_PARAGRAPH = "positionOfParagraph";
	
	/**
	 * what kind of link this is (see below for options)
	 */
	public static final String KEY_TYPE = "type";
	
	public static final String VAL_LINK = "Link";
	public static final String VAL_CATEGORY = "Kategorie";
	public static final String VAL_FILE = "Datei";

	private HashMap<String, String> stringInfo = new HashMap<String, String>();
	private HashMap<String, Integer> intInfo = new HashMap<String, Integer>();
	
	public String getString(String key){
		return stringInfo.get(key);
	}
	
	public int getInt(String key){
		Integer result = intInfo.get(key);
		if(result == null){
			return -1;
		}
		return result;
	}
	
	public void setString(String key, String value){
		stringInfo.put(key, value);
	}
	
	public void setInt(String key, int value){
		intInfo.put(key, value);
	}
	
}
